export default {
    render(h){
        // 获取当前路由对应的组件
        // let component = null
        // const route = this.$router.$options.routes.find(
        //   (route) => route.path === this.$router.current
        // );
        // if (route) {
        //   component = route.component
        // }
        // return h(component);

        const {routeMap, current} = this.$router
        const component = routeMap[current] ? routeMap[current].component : null;
        return h(component);
    }
}